<?php

class Application_Form_HireUnits extends Zend_Form
{

    public function init()
    {
        $unitsHireNr = new Zend_Form_Element_Text('unitsNrHire');
        $unitsHireNr->setLabel('Insert number of units:')
        		->addValidator('Int')
        		->setAttrib('size','10')
                ->setRequired(true);
                  
                    
        $unitHireType = new Zend_Form_Element_Hidden('buildingHireName');

        $errorHireLabel = new Zend_Form_Element_Hidden('errorHireLabel');
        $errorHireLabel->setLabel('');
                
        $hire = new Zend_Form_Element_Submit('hire');
        $hire->setLabel('HIRE');
                
        $this->addElements(array(
        				$unitHireType,
                        $unitsHireNr,
                        $hire,
                        $errorHireLabel
                        ));
                        
        $this->setAction('/buildings/hire'); 
                        
        $this->setElementDecorators(array('ViewHelper','Label'));

        $hire->setDecorators(array('ViewHelper'));
        
		$this->setDecorators(array(
						'FormElements',
						array('HtmlTag', array('tag' => 'div', 'class'=> 'buildForm', 'id'=>'style')),
						'Form'
						));
    }


}

